<%@ Page language="C#" AutoEventWireup="true" CodeFile="edit_report.aspx.cs" Inherits="edit_report" %>
<!--
Copyright 2002-2011 Corey Trager
Distributed under the terms of the GNU General Public License
-->
<html>
<head>
<title id="titl" runat="server">btnet edit report</title>
<link rel="stylesheet" href="btnet.css" type="text/css">
<script language="Javascript" type="text/javascript" src="edit_area/edit_area_full.js"></script>

<script>
		editAreaLoader.init({
			id: "sql_text"	// id of the textarea to transform
			,start_highlight: true	// if start with highlight
			,toolbar: "search, go_to_line, undo, redo, help"
			,browsers: "all"
			,language: "en"
			,syntax: "sql"
			,allow_toggle: false
			,min_height: 300
			,min_width: 400
		});
</script>
</head>

<body>
<% security.write_menu(Response, "reports"); %>
<div class='align'>
<a href='reports.aspx'>back to reports</a>
<br><br>
<table border='0'>
	<tr>
		<td>
			<form class='frm' runat="server">
				<table border='0'>
					<tr>
						<td class='lbl'>Description:</td>
						<td><input runat="server" type='text' class='txt' id="desc" maxlength='80' size='80'></td>
						<td runat="server" class='err' id="desc_err">&nbsp;</td>
					</tr>
					<tr>
						<td class='lbl'>Chart Type:</td>
						<td>
							<asp:RadioButton text="Table" runat="server" GroupName="chart_type" id="table" />
							&nbsp;&nbsp;&nbsp;
							<asp:RadioButton text="Pie" runat="server" GroupName="chart_type" id="pie" />
							&nbsp;&nbsp;&nbsp;
							<asp:RadioButton text="Bar" runat="server" GroupName="chart_type" id="bar" />
							&nbsp;&nbsp;&nbsp;
							<asp:RadioButton text="Line" runat="server" GroupName="chart_type" id="line" />
							&nbsp;&nbsp;&nbsp;
						</td>
						<td runat="server" class='err' id="chart_type_err">&nbsp;</td>
					</tr>
					
					<tr>
						<td colspan=3>
						&nbsp;
						</td>
					</tr>
					
					<tr>
						<td class='lbl'>SQL:</td>
						<td colspan='2'>
							<textarea rows='10' cols='70' runat="server" class='txt' name="sql_text" id="sql_text"></textarea>
						</td>
					</tr>
					<tr>
						<td colspan='3' align='center'>
							<span runat="server" class='err' id="msg">&nbsp;</span>
						</td>
					</tr>
					<tr>
						<td colspan='2' align='center'>
							<input runat="server" class='btn' type='submit' id="sub" value="Create or Edit">
						</td>
						<td>&nbsp</td>
					</tr>
					<tr>
						<td>&nbsp</td>
						<td colspan='2' class='cmt'>
							To use "Pie", "Bar", or "Line", your SQL statement should have two columns <br>where the first column is the label and the second column contains the value.
							<br><br>
							You can use the pseudo-variable $ME in your report which will be replaced by your user ID.
							<br>
							For example:
							<ul>
								  select .... from ....<br>
	  							  where bg_assigned_to_user = $ME
	  						</ul>
						</td>
					</tr>
				</table>
			</form>
		</td>
	</tr>
</table>
<asp:Literal ID="custom_footer_label" runat="server"></asp:Literal></body>
</html>


